package club.babyf.common.model;

import lombok.Data;

import java.util.List;

/**
 * PageResult.
 *
 * @author zhanglei.
 * @date 2024/12/20 17:16.
 * @description PageResult.
 */
@Data
public class PageResult<T> {

    private long totalElements;

    private int totalPages;

    private int size;

    private int number;

    private List<T> content;

    public PageResult<T> setTotalElements(final long totalElements) {
        this.totalElements = totalElements;
        return this;
    }

    public PageResult<T> setTotalPages(final int totalPages) {
        this.totalPages = totalPages;
        return this;
    }

    public PageResult<T> setSize(final int size) {
        this.size = size;
        return this;
    }

    public PageResult<T> setNumber(final int number) {
        this.number = number;
        return this;
    }

    public PageResult<T> setContent(final List<T> content) {
        this.content = content;
        return this;
    }

}
